Optimal. Leaf size=196 \[ -\frac {1}{2} a^2 c \text {Li}_3\left (1-\frac {2}{i a x+1}\right )+\frac {1}{2} a^2 c \text {Li}_3\left (\frac {2}{i a x+1}-1\right )-i a^2 c \text {Li}_2\left (1-\frac {2}{i a x+1}\right ) \tan ^{-1}(a x)+i a^2 c \text {Li}_2\left (\frac {2}{i a x+1}-1\right ) \tan ^{-1}(a x)-\frac {1}{2} a^2 c \log \left (a^2 x^2+1\right )+a^2 c \log (x)-\frac {1}{2} a^2 c \tan ^{-1}(a x)^2+2 a^2 c \tan ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1+i a x}\right )-\frac {c \tan ^{-1}(a x)^2}{2 x^2}-\frac {a c \tan ^{-1}(a x)}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.33, antiderivative size = 196, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 12, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {4950, 4852, 4918, 266, 36, 29, 31, 4884, 4850, 4988, 4994, 6610} \[ -\frac {1}{2} a^2 c \text {PolyLog}\left (3,1-\frac {2}{1+i a x}\right )+\frac {1}{2} a^2 c \text {PolyLog}\left (3,-1+\frac {2}{1+i a x}\right )-i a^2 c \tan ^{-1}(a x) \text {PolyLog}\left (2,1-\frac {2}{1+i a x}\right )+i a^2 c \tan ^{-1}(a x) \text {PolyLog}\left (2,-1+\frac {2}{1+i a x}\right )-\frac {1}{2} a^2 c \log \left (a^2 x^2+1\right )+a^2 c \log (x)-\frac {1}{2} a^2 c \tan ^{-1}(a x)^2+2 a^2 c \tan ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1+i a x}\right )-\frac {c \tan ^{-1}(a x)^2}{2 x^2}-\frac {a c \tan ^{-1}(a x)}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 266
Rule 4850
Rule 4852
Rule 4884
Rule 4918
Rule 4950
Rule 4988
Rule 4994
Rule 6610
Rubi steps
\begin {align*} \int \frac {\left (c+a^2 c x^2\right ) \tan ^{-1}(a x)^2}{x^3} \, dx &=c \int \frac {\tan ^{-1}(a x)^2}{x^3} \, dx+\left (a^2 c\right ) \int \frac {\tan ^{-1}(a x)^2}{x} \, dx\\ &=-\frac {c \tan ^{-1}(a x)^2}{2 x^2}+2 a^2 c \tan ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1+i a x}\right )+(a c) \int \frac {\tan ^{-1}(a x)}{x^2 \left (1+a^2 x^2\right )} \, dx-\left (4 a^3 c\right ) \int \frac {\tan ^{-1}(a x) \tanh ^{-1}\left (1-\frac {2}{1+i a x}\right )}{1+a^2 x^2} \, dx\\ &=-\frac {c \tan ^{-1}(a x)^2}{2 x^2}+2 a^2 c \tan ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1+i a x}\right )+(a c) \int \frac {\tan ^{-1}(a x)}{x^2} \, dx-\left (a^3 c\right ) \int \frac {\tan ^{-1}(a x)}{1+a^2 x^2} \, dx+\left (2 a^3 c\right ) \int \frac {\tan ^{-1}(a x) \log \left (\frac {2}{1+i a x}\right )}{1+a^2 x^2} \, dx-\left (2 a^3 c\right ) \int \frac {\tan ^{-1}(a x) \log \left (2-\frac {2}{1+i a x}\right )}{1+a^2 x^2} \, dx\\ &=-\frac {a c \tan ^{-1}(a x)}{x}-\frac {1}{2} a^2 c \tan ^{-1}(a x)^2-\frac {c \tan ^{-1}(a x)^2}{2 x^2}+2 a^2 c \tan ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1+i a x}\right )-i a^2 c \tan ^{-1}(a x) \text {Li}_2\left (1-\frac {2}{1+i a x}\right )+i a^2 c \tan ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1+i a x}\right )+\left (a^2 c\right ) \int \frac {1}{x \left (1+a^2 x^2\right )} \, dx+\left (i a^3 c\right ) \int \frac {\text {Li}_2\left (1-\frac {2}{1+i a x}\right )}{1+a^2 x^2} \, dx-\left (i a^3 c\right ) \int \frac {\text {Li}_2\left (-1+\frac {2}{1+i a x}\right )}{1+a^2 x^2} \, dx\\ &=-\frac {a c \tan ^{-1}(a x)}{x}-\frac {1}{2} a^2 c \tan ^{-1}(a x)^2-\frac {c \tan ^{-1}(a x)^2}{2 x^2}+2 a^2 c \tan ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1+i a x}\right )-i a^2 c \tan ^{-1}(a x) \text {Li}_2\left (1-\frac {2}{1+i a x}\right )+i a^2 c \tan ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1+i a x}\right )-\frac {1}{2} a^2 c \text {Li}_3\left (1-\frac {2}{1+i a x}\right )+\frac {1}{2} a^2 c \text {Li}_3\left (-1+\frac {2}{1+i a x}\right )+\frac {1}{2} \left (a^2 c\right ) \operatorname {Subst}\left (\int \frac {1}{x \left (1+a^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac {a c \tan ^{-1}(a x)}{x}-\frac {1}{2} a^2 c \tan ^{-1}(a x)^2-\frac {c \tan ^{-1}(a x)^2}{2 x^2}+2 a^2 c \tan ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1+i a x}\right )-i a^2 c \tan ^{-1}(a x) \text {Li}_2\left (1-\frac {2}{1+i a x}\right )+i a^2 c \tan ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1+i a x}\right )-\frac {1}{2} a^2 c \text {Li}_3\left (1-\frac {2}{1+i a x}\right )+\frac {1}{2} a^2 c \text {Li}_3\left (-1+\frac {2}{1+i a x}\right )+\frac {1}{2} \left (a^2 c\right ) \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )-\frac {1}{2} \left (a^4 c\right ) \operatorname {Subst}\left (\int \frac {1}{1+a^2 x} \, dx,x,x^2\right )\\ &=-\frac {a c \tan ^{-1}(a x)}{x}-\frac {1}{2} a^2 c \tan ^{-1}(a x)^2-\frac {c \tan ^{-1}(a x)^2}{2 x^2}+2 a^2 c \tan ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2}{1+i a x}\right )+a^2 c \log (x)-\frac {1}{2} a^2 c \log \left (1+a^2 x^2\right )-i a^2 c \tan ^{-1}(a x) \text {Li}_2\left (1-\frac {2}{1+i a x}\right )+i a^2 c \tan ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1+i a x}\right )-\frac {1}{2} a^2 c \text {Li}_3\left (1-\frac {2}{1+i a x}\right )+\frac {1}{2} a^2 c \text {Li}_3\left (-1+\frac {2}{1+i a x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 208, normalized size = 1.06 \[ \frac {1}{2} a^2 c \text {Li}_3\left (\frac {-a x-i}{a x-i}\right )-\frac {1}{2} a^2 c \text {Li}_3\left (\frac {a x+i}{a x-i}\right )+i a^2 c \text {Li}_2\left (\frac {-a x-i}{a x-i}\right ) \tan ^{-1}(a x)-i a^2 c \text {Li}_2\left (\frac {a x+i}{a x-i}\right ) \tan ^{-1}(a x)-\frac {1}{2} a^2 c \log \left (a^2 x^2+1\right )+\frac {c \left (-a^2 x^2-1\right ) \tan ^{-1}(a x)^2}{2 x^2}+a^2 c \log (x)+2 a^2 c \tan ^{-1}(a x)^2 \tanh ^{-1}\left (1-\frac {2 i}{-a x+i}\right )-\frac {a c \tan ^{-1}(a x)}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.71, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (a^{2} c x^{2} + c\right )} \arctan \left (a x\right )^{2}}{x^{3}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 6.32, size = 1167, normalized size = 5.95 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {{\left (72 \, a^{4} c \int \frac {x^{4} \arctan \left (a x\right )^{2}}{a^{2} x^{5} + x^{3}}\,{d x} + a^{2} c \log \left (a^{2} x^{2} + 1\right )^{3} - 3 \, {\left (a^{2} {\left (\frac {\log \left (a^{2} x^{2} + 1\right )^{2}}{a^{2}} - \frac {2 \, {\left (2 \, \log \left (a^{2} x^{2} + 1\right ) \log \relax (x) + {\rm Li}_2\left (-a^{2} x^{2}\right )\right )}}{a^{2}}\right )} - 2 \, {\left (\log \left (a^{2} x^{2} + 1\right ) - 2 \, \log \relax (x)\right )} \log \left (a^{2} x^{2} + 1\right )\right )} a^{2} c - 2 \, {\left (\log \left (a^{2} x^{2} + 1\right )^{3} - 3 \, \log \left (a^{2} x^{2} + 1\right )^{2} \log \left (-a^{2} x^{2}\right ) - 6 \, {\rm Li}_2\left (a^{2} x^{2} + 1\right ) \log \left (a^{2} x^{2} + 1\right ) + 6 \, {\rm Li}_{3}(a^{2} x^{2} + 1)\right )} a^{2} c + 144 \, a^{2} c \int \frac {x^{2} \arctan \left (a x\right )^{2}}{a^{2} x^{5} + x^{3}}\,{d x} + 12 \, {\left ({\left (\arctan \left (a x\right )^{2} - \log \left (a^{2} x^{2} + 1\right ) + 2 \, \log \relax (x)\right )} a - 2 \, {\left (a \arctan \left (a x\right ) + \frac {1}{x}\right )} \arctan \left (a x\right )\right )} a c - {\left (3 \, {\left (\log \left (a^{2} x^{2} + 1\right )^{2} \log \left (-a^{2} x^{2}\right ) + 2 \, {\rm Li}_2\left (a^{2} x^{2} + 1\right ) \log \left (a^{2} x^{2} + 1\right ) - 2 \, {\rm Li}_{3}(a^{2} x^{2} + 1)\right )} a^{2} - 6 \, {\left (\log \left (a^{2} x^{2} + 1\right ) \log \left (-a^{2} x^{2}\right ) + {\rm Li}_2\left (a^{2} x^{2} + 1\right )\right )} a^{2} - \frac {a^{2} x^{2} \log \left (a^{2} x^{2} + 1\right )^{3} - 3 \, {\left (a^{2} x^{2} + 1\right )} \log \left (a^{2} x^{2} + 1\right )^{2}}{x^{2}}\right )} c + 72 \, c \int \frac {\arctan \left (a x\right )^{2}}{a^{2} x^{5} + x^{3}}\,{d x}\right )} x^{2} - 12 \, c \arctan \left (a x\right )^{2} + 3 \, c \log \left (a^{2} x^{2} + 1\right )^{2}}{96 \, x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\mathrm {atan}\left (a\,x\right )}^2\,\left (c\,a^2\,x^2+c\right )}{x^3} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ c \left (\int \frac {\operatorname {atan}^{2}{\left (a x \right )}}{x^{3}}\, dx + \int \frac {a^{2} \operatorname {atan}^{2}{\left (a x \right )}}{x}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________